package com.derbysoft.drc.billcheck

import org.apache.commons.lang.StringUtils
import org.apache.spark.{SparkConf, SparkContext}

import scala.io.Source

/**
  * Created by xinliwang on 2017/6/4.
  */
object LostAnyles {

    def main(args: Array[String]): Unit = {
      val conf = new SparkConf().setMaster("local").setAppName("HotelReservationCodeDetail")
      val sc = new SparkContext(conf)
      val rdd = sc.textFile("/Users/xinliwang/Downloads/CARLSON_201611_cancel_res_detail.csv")
//      val filter = rdd.map(each=>(each.split(",")(2),1)).reduceByKey(_  + _).filter(_._2!=1)
//      filter.foreach(println)
//      val sum = filter.map(_._2-1).sum()
//      println("===>"+sum)
      println(rdd.count())
    }


}
